home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Developer Kits / BBEdit Extension Dev. Kit / Examples / CutContaining.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-08  |  2.6 KB  |  33 lines  |  [TEXT/KAHL]

  1. #include <SetupA4.h>
  2. #include "ExternalInterface.h"
  3. #include "DialogUtilities.h"
  4.  
  5. static void maintain_buttons(DialogPtr d)
  6. {
  7.     Boolean enable;
  8.     Str255 s;
  9.     
  10.     ReadStrItem(d, 4, s);
  11.     enable = (s[0] != 0);
  12.     
  13.     if (enable != TestDlgCtl(d, 1))
  14.         XAbleDlgCtl(d, 1, enable);
  15. }
  16.  
  17. pascal void main(ExternalCallbackBlock *callbacks, WindowPtr w)
  18. {
  19.     long line_count;
  20.     long line;
  21.     
  22.     long orig_lines, act_line;
  23.     
  24.     long line_start;
  25.     long line_end;
  26.     
  27.     Handle text;
  28.     
  29.     Handle    copy;
  30.     Boolean    found;
  31.     
  32.     Str255 search_str;
  33.     Boolean ca